/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.ValidarRutDAO;
import DAO.garantiasDAO;
import DTO.garanteDTO;
import DTO.usuarioDTO;
import java.text.SimpleDateFormat;
import javax.swing.JOptionPane;

/**
 *
 * @author Luis Olave 10
 */
public class EliminacionGarante extends javax.swing.JFrame {
    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();
    garanteDTO garante = new garanteDTO();
    /**
     * Creates new form EliminacionGarante
     */
    public EliminacionGarante(usuarioDTO user) {
        this.user = user;
        initComponents();
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        pnlPrincipal = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        pnlIngresarDatosGarante = new javax.swing.JPanel();
        pnlDatosPersonales = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        txtApellPatEliGar = new javax.swing.JTextField();
        txtApellMatEliGar = new javax.swing.JTextField();
        txtRutEliGar = new javax.swing.JTextField();
        txtNombreEliGar = new javax.swing.JTextField();
        txtFechNacEliGar = new javax.swing.JTextField();
        rdMascEliGar = new javax.swing.JRadioButton();
        rdFemEliGar = new javax.swing.JRadioButton();
        jLabel12 = new javax.swing.JLabel();
        chkGaranteInactivo = new javax.swing.JCheckBox();
        pnlDireParticular = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        txtDeptoPartiEliGar = new javax.swing.JTextField();
        txtNumPartiEliGar = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtCalleAvPartiEliGar = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        txtPoblaEliGar = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        txtRegionPartEliGar = new javax.swing.JTextField();
        txtComuPartEliGar = new javax.swing.JTextField();
        pnlNumContacto = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        txtTelPartEliGar = new javax.swing.JTextField();
        txtTelTrabEliGar = new javax.swing.JTextField();
        txtTelMovEliGar = new javax.swing.JTextField();
        txtFaxEliGar = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        txtMailEliGar = new javax.swing.JTextField();
        pnlDireTrabajo = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        txtNomEmpTrabEliGar = new javax.swing.JTextField();
        txtNumOfiEliGar = new javax.swing.JTextField();
        txtNumTrabEliGar = new javax.swing.JTextField();
        txtCalleTrabEliGar = new javax.swing.JTextField();
        txtRegTrabEliGar = new javax.swing.JTextField();
        txtComuEliGar = new javax.swing.JTextField();
        btnEliminarGara = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();
        btnMenuPrincipal = new javax.swing.JButton();
        pnlIngreseRutGarante = new javax.swing.JPanel();
        lblRut = new javax.swing.JLabel();
        txtRutBuscarEliGar = new javax.swing.JTextField();
        btnBuscar = new javax.swing.JButton();
        jLabel27 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("ELIMINAR GARANTE");
        setResizable(false);

        pnlPrincipal.setPreferredSize(new java.awt.Dimension(600, 640));

        jLabel1.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel1.setText("ELIMINACIÓN DE GARANTES");

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        pnlIngresarDatosGarante.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 12), java.awt.Color.blue)); // NOI18N

        pnlDatosPersonales.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel3.setText("RUT");

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("APELLIDO PATERNO");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("APELLIDO MATERNO");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("NOMBRE");

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("FECHA NACIMIENTO");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("SEXO");

        txtApellPatEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatEliGar.setEnabled(false);

        txtApellMatEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatEliGar.setEnabled(false);

        txtRutEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtRutEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutEliGar.setEnabled(false);

        txtNombreEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreEliGar.setEnabled(false);

        txtFechNacEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtFechNacEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechNacEliGar.setEnabled(false);

        rdMascEliGar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        rdMascEliGar.setSelected(true);
        rdMascEliGar.setText("MASCULINO");
        rdMascEliGar.setEnabled(false);

        rdFemEliGar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        rdFemEliGar.setText("FEMENINO");
        rdFemEliGar.setEnabled(false);

        jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel12.setText("ESTADO GARANTE");

        chkGaranteInactivo.setText("Inactivo");

        javax.swing.GroupLayout pnlDatosPersonalesLayout = new javax.swing.GroupLayout(pnlDatosPersonales);
        pnlDatosPersonales.setLayout(pnlDatosPersonalesLayout);
        pnlDatosPersonalesLayout.setHorizontalGroup(
            pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3))
                        .addGap(32, 32, 32)
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtApellPatEliGar)
                            .addComponent(txtRutEliGar)))
                    .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6))
                        .addGap(28, 28, 28)
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNombreEliGar)
                            .addComponent(txtApellMatEliGar)))
                    .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addComponent(jLabel8)
                            .addComponent(jLabel12))
                        .addGap(29, 29, 29)
                        .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                                .addComponent(rdMascEliGar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rdFemEliGar))
                            .addComponent(txtFechNacEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkGaranteInactivo))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlDatosPersonalesLayout.setVerticalGroup(
            pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersonalesLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txtRutEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtApellPatEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(txtApellMatEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNombreEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(txtFechNacEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rdMascEliGar)
                    .addComponent(rdFemEliGar)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDatosPersonalesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(chkGaranteInactivo))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        pnlDireParticular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DIRECCIÓN PARTICULAR", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel11.setText("DEPTO.");

        txtDeptoPartiEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtDeptoPartiEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDeptoPartiEliGar.setEnabled(false);

        txtNumPartiEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtNumPartiEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNumPartiEliGar.setEnabled(false);

        jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel10.setText("NÚMERO");

        jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel9.setText("CALLE / AVENIDA");

        txtCalleAvPartiEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtCalleAvPartiEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtCalleAvPartiEliGar.setEnabled(false);

        jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel13.setText("POBLACIÓN / VILLA");

        txtPoblaEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtPoblaEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtPoblaEliGar.setEnabled(false);

        jLabel23.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel23.setText("REGIÓN");

        jLabel24.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel24.setText("COMUNA");

        txtRegionPartEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtRegionPartEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRegionPartEliGar.setEnabled(false);

        txtComuPartEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtComuPartEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtComuPartEliGar.setEnabled(false);

        javax.swing.GroupLayout pnlDireParticularLayout = new javax.swing.GroupLayout(pnlDireParticular);
        pnlDireParticular.setLayout(pnlDireParticularLayout);
        pnlDireParticularLayout.setHorizontalGroup(
            pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireParticularLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDireParticularLayout.createSequentialGroup()
                        .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9)
                            .addComponent(jLabel10)
                            .addComponent(jLabel11))
                        .addGap(31, 31, 31)
                        .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtDeptoPartiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtNumPartiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtCalleAvPartiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlDireParticularLayout.createSequentialGroup()
                        .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel13)
                            .addComponent(jLabel23)
                            .addComponent(jLabel24))
                        .addGap(18, 18, 18)
                        .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtComuPartEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtRegionPartEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtPoblaEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(56, Short.MAX_VALUE))
        );
        pnlDireParticularLayout.setVerticalGroup(
            pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireParticularLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txtCalleAvPartiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(txtNumPartiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtDeptoPartiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(txtPoblaEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(txtRegionPartEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireParticularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(txtComuPartEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlNumContacto.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CONTACTO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("TEL. PARTICULAR");

        jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel15.setText("TEL. TRABAJO ");

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("TEL. MOVIL");

        jLabel17.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel17.setText("FAX");

        txtTelPartEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtTelPartEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelPartEliGar.setEnabled(false);

        txtTelTrabEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtTelTrabEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelTrabEliGar.setEnabled(false);

        txtTelMovEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtTelMovEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelMovEliGar.setEnabled(false);

        txtFaxEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtFaxEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFaxEliGar.setEnabled(false);

        jLabel26.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel26.setText("MAIL");

        txtMailEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtMailEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtMailEliGar.setEnabled(false);

        javax.swing.GroupLayout pnlNumContactoLayout = new javax.swing.GroupLayout(pnlNumContacto);
        pnlNumContacto.setLayout(pnlNumContactoLayout);
        pnlNumContactoLayout.setHorizontalGroup(
            pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlNumContactoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15)
                    .addComponent(jLabel16)
                    .addComponent(jLabel17)
                    .addComponent(jLabel26))
                .addGap(18, 18, 18)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtFaxEliGar, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)
                    .addComponent(txtTelMovEliGar)
                    .addComponent(txtTelTrabEliGar)
                    .addComponent(txtMailEliGar)
                    .addComponent(txtTelPartEliGar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlNumContactoLayout.setVerticalGroup(
            pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlNumContactoLayout.createSequentialGroup()
                .addContainerGap(46, Short.MAX_VALUE)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtTelPartEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtTelTrabEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(txtTelMovEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtFaxEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlNumContactoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(txtMailEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26))
        );

        pnlDireTrabajo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DIRECCIÓN TRABAJO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel18.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel18.setText("CALLE / AVENIDA");

        jLabel19.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel19.setText("NÚMERO");

        jLabel20.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel20.setText("NÚMERO OFICINA");

        jLabel21.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel21.setText("REGIÓN");

        jLabel22.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel22.setText("COMUNA");

        jLabel25.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel25.setText("NOMBRE EMPRESA");

        txtNomEmpTrabEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtNomEmpTrabEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNomEmpTrabEliGar.setEnabled(false);

        txtNumOfiEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtNumOfiEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNumOfiEliGar.setEnabled(false);

        txtNumTrabEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtNumTrabEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNumTrabEliGar.setEnabled(false);

        txtCalleTrabEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtCalleTrabEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtCalleTrabEliGar.setEnabled(false);

        txtRegTrabEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtRegTrabEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRegTrabEliGar.setEnabled(false);

        txtComuEliGar.setBackground(new java.awt.Color(255, 255, 102));
        txtComuEliGar.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtComuEliGar.setEnabled(false);

        javax.swing.GroupLayout pnlDireTrabajoLayout = new javax.swing.GroupLayout(pnlDireTrabajo);
        pnlDireTrabajo.setLayout(pnlDireTrabajoLayout);
        pnlDireTrabajoLayout.setHorizontalGroup(
            pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireTrabajoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel25)
                    .addComponent(jLabel20)
                    .addComponent(jLabel19)
                    .addComponent(jLabel18)
                    .addComponent(jLabel21)
                    .addComponent(jLabel22))
                .addGap(18, 18, 18)
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtCalleTrabEliGar, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                    .addComponent(txtNumTrabEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtNumOfiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtNomEmpTrabEliGar)
                    .addComponent(txtComuEliGar)
                    .addComponent(txtRegTrabEliGar))
                .addContainerGap(15, Short.MAX_VALUE))
        );
        pnlDireTrabajoLayout.setVerticalGroup(
            pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireTrabajoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(txtCalleTrabEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(txtNumTrabEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(txtNumOfiEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(txtNomEmpTrabEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(txtRegTrabEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireTrabajoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(txtComuEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlIngresarDatosGaranteLayout = new javax.swing.GroupLayout(pnlIngresarDatosGarante);
        pnlIngresarDatosGarante.setLayout(pnlIngresarDatosGaranteLayout);
        pnlIngresarDatosGaranteLayout.setHorizontalGroup(
            pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pnlDatosPersonales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlDireParticular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlNumContacto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlDireTrabajo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlIngresarDatosGaranteLayout.setVerticalGroup(
            pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                .addGroup(pnlIngresarDatosGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                        .addComponent(pnlDatosPersonales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(pnlDireParticular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlIngresarDatosGaranteLayout.createSequentialGroup()
                        .addComponent(pnlNumContacto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(pnlDireTrabajo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(0, 9, Short.MAX_VALUE))
        );

        btnEliminarGara.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnEliminarGara.setText("ELIMINAR");
        btnEliminarGara.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarGaraActionPerformed(evt);
            }
        });

        btnCancelar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnCancelar.setText("CANCELAR");
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });

        btnMenuPrincipal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPrincipal.setText("MENÚ PRINCIPAL >>");
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        pnlIngreseRutGarante.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblRut.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblRut.setText("RUT");

        btnBuscar.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscar.setText("BUSCAR");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGaranteLayout = new javax.swing.GroupLayout(pnlIngreseRutGarante);
        pnlIngreseRutGarante.setLayout(pnlIngreseRutGaranteLayout);
        pnlIngreseRutGaranteLayout.setHorizontalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblRut)
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtRutBuscarEliGar)
                    .addComponent(btnBuscar, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlIngreseRutGaranteLayout.setVerticalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblRut)
                    .addComponent(txtRutBuscarEliGar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscar)
                .addContainerGap())
        );

        jLabel27.setText("MENÚ PRINCIPAL\\ELIMINACIÓN DE GARANTES");

        javax.swing.GroupLayout pnlPrincipalLayout = new javax.swing.GroupLayout(pnlPrincipal);
        pnlPrincipal.setLayout(pnlPrincipalLayout);
        pnlPrincipalLayout.setHorizontalGroup(
            pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel27))
                .addGroup(pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlPrincipalLayout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlPrincipalLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(jLabel1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(pnlPrincipalLayout.createSequentialGroup()
                .addGap(179, 179, 179)
                .addComponent(btnEliminarGara)
                .addGap(36, 36, 36)
                .addComponent(btnCancelar)
                .addGap(18, 18, 18)
                .addComponent(btnMenuPrincipal)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlPrincipalLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(pnlIngresarDatosGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 691, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31))
        );
        pnlPrincipalLayout.setVerticalGroup(
            pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlPrincipalLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel27))
                    .addGroup(pnlPrincipalLayout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlIngresarDatosGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnEliminarGara)
                    .addComponent(btnCancelar)
                    .addComponent(btnMenuPrincipal))
                .addGap(19, 19, 19))
        );

        jScrollPane1.setViewportView(pnlPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 713, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)
                .addContainerGap())
        );

        setSize(new java.awt.Dimension(739, 714));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        if(ValidarRutDAO.validarRut(this.txtRutBuscarEliGar.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
        String rut = this.txtRutBuscarEliGar.getText();
        garante = reg.buscarPorRut(rut);
        if (garante.getRut_gara().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "El Garante NO EXISTE");
            txtRutBuscarEliGar.setText("");
            
        }
        else
        {
            txtRutEliGar.setText(garante.getRut_gara());
            txtApellPatEliGar.setText(garante.getApell_paterno_gara());
            txtApellMatEliGar.setText(garante.getApell_materno_gara());
            txtNombreEliGar.setText(garante.getNombre_gara());
            txtFechNacEliGar.setText(new SimpleDateFormat("dd-MM-yyyy").format(garante.getFecha_nac_gara()));
            String sexo = garante.getSexo_gara();
            if(sexo.equals("Masculino"))
            {
                rdMascEliGar.isSelected();
            }
            else
            {
                rdFemEliGar.isSelected();
            }
            Boolean estado = Boolean.valueOf(garante.getEstado());
            chkGaranteInactivo.setSelected(estado);
            
            txtCalleAvPartiEliGar.setText(garante.getCalle_gara());
            txtNumPartiEliGar.setText(String.valueOf(garante.getNum_gara()));
            txtDeptoPartiEliGar.setText(garante.getDepto_gara());
            txtPoblaEliGar.setText(garante.getPobla_gara());
            txtRegionPartEliGar.setText(garante.getReg_gara());
            txtComuPartEliGar.setText(garante.getComu_gara());
            txtTelPartEliGar.setText(String.valueOf(garante.getTel_part_gara()));
            txtTelTrabEliGar.setText(String.valueOf(garante.getTel_trab_gara()));
            txtTelMovEliGar.setText(String.valueOf(garante.getTel_mov_gara()));
            txtFaxEliGar.setText(String.valueOf(garante.getFax_gara()));
            txtMailEliGar.setText(garante.getE_mail());
            txtCalleTrabEliGar.setText(garante.getCalle_trab_gara());
            txtNumTrabEliGar.setText(String.valueOf(garante.getNum_trab_gara()));
            txtNumOfiEliGar.setText(garante.getNum_ofi_gara());
            txtNomEmpTrabEliGar.setText(garante.getNom_emp_gara());
            txtRegTrabEliGar.setText(garante.getReg_emp_gara());
            txtComuEliGar.setText(garante.getComu_emp_gara());
            txtRutBuscarEliGar.setEnabled(false); 
        }}else
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
        }
    }//GEN-LAST:event_btnBuscarActionPerformed

    private void cambiarVentana()
    {
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        EliminacionGarante.this.dispose();
    }   
    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        cambiarVentana();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed

    private void btnEliminarGaraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarGaraActionPerformed
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Esta seguro de eliminar a " + garante.getNombre_gara() + " " + garante.getApell_paterno_gara() + " como Garante?", "Eliminacion", JOptionPane.OK_CANCEL_OPTION);
        //Si acepta
        if(respuesta == 0)
        {
            
            
            String estado = "";
            if(this.chkGaranteInactivo.isSelected())
            {
                estado ="true";
            }
            else
            {
                estado="false";
            }
             
            reg.eliminarGarante(this.txtRutBuscarEliGar.getText(), estado);
            javax.swing.JOptionPane.showMessageDialog(null,"Garante Eliminado correctamente");
            cambiarVentana();
        }
        else
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Problermas al eliminar contacte a soporte");
        }
    }//GEN-LAST:event_btnEliminarGaraActionPerformed

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnCancelarActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarante.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarante.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarante.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(EliminacionGarante.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new EliminacionGarante().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnEliminarGara;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.JCheckBox chkGaranteInactivo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblRut;
    private javax.swing.JPanel pnlDatosPersonales;
    private javax.swing.JPanel pnlDireParticular;
    private javax.swing.JPanel pnlDireTrabajo;
    private javax.swing.JPanel pnlIngresarDatosGarante;
    private javax.swing.JPanel pnlIngreseRutGarante;
    private javax.swing.JPanel pnlNumContacto;
    private javax.swing.JPanel pnlPrincipal;
    private javax.swing.JRadioButton rdFemEliGar;
    private javax.swing.JRadioButton rdMascEliGar;
    private javax.swing.JTextField txtApellMatEliGar;
    private javax.swing.JTextField txtApellPatEliGar;
    private javax.swing.JTextField txtCalleAvPartiEliGar;
    private javax.swing.JTextField txtCalleTrabEliGar;
    private javax.swing.JTextField txtComuEliGar;
    private javax.swing.JTextField txtComuPartEliGar;
    private javax.swing.JTextField txtDeptoPartiEliGar;
    private javax.swing.JTextField txtFaxEliGar;
    private javax.swing.JTextField txtFechNacEliGar;
    private javax.swing.JTextField txtMailEliGar;
    private javax.swing.JTextField txtNomEmpTrabEliGar;
    private javax.swing.JTextField txtNombreEliGar;
    private javax.swing.JTextField txtNumOfiEliGar;
    private javax.swing.JTextField txtNumPartiEliGar;
    private javax.swing.JTextField txtNumTrabEliGar;
    private javax.swing.JTextField txtPoblaEliGar;
    private javax.swing.JTextField txtRegTrabEliGar;
    private javax.swing.JTextField txtRegionPartEliGar;
    private javax.swing.JTextField txtRutBuscarEliGar;
    private javax.swing.JTextField txtRutEliGar;
    private javax.swing.JTextField txtTelMovEliGar;
    private javax.swing.JTextField txtTelPartEliGar;
    private javax.swing.JTextField txtTelTrabEliGar;
    // End of variables declaration//GEN-END:variables
}
